package com.wbcs.system.intercept;

import java.util.List;
import java.util.Map;

import com.wbcs.config.component.application.report.ReportBean;
import com.wbcs.system.ReportRequest;
import com.wbcs.system.component.application.report.abstractreport.AbsReportType;
import com.wbcs.system.component.application.report.configbean.editablereport.AbsEditActionBean;
import com.wbcs.system.component.application.report.configbean.editablereport.AbsEditableReportEditDataBean;
import com.wbcs.util.Consts;

public interface IInterceptor
{
    public final int WX_RETURNVAL_SUCCESS=2;

    public final int WX_RETURNVAL_SUCCESS_NOTREFRESH=1;

    public final int WX_RETURNVAL_SKIP=0;

    public final int WX_RETURNVAL_TERMINATE=-1;

    public final int WX_INSERT=Consts.UPDATETYPE_INSERT;

    public final int WX_UPDATE=Consts.UPDATETYPE_UPDATE;

    public final int WX_DELETE=Consts.UPDATETYPE_DELETE;

    public void doStart(ReportRequest rrequest,ReportBean rbean);

    public int doSave(ReportRequest rrequest,ReportBean rbean,AbsEditableReportEditDataBean editbean);

    public int doSavePerRow(ReportRequest rrequest,ReportBean rbean,Map<String,String> mRowData,Map<String,String> mParamValues,
            AbsEditableReportEditDataBean editbean);

    public int doSavePerAction(ReportRequest rrequest,ReportBean rbean,Map<String,String> mRowData,Map<String,String> mParamValues,
            AbsEditActionBean actionbean,AbsEditableReportEditDataBean editbean);

    public Object beforeLoadData(ReportRequest rrequest,ReportBean rbean,Object typeObj,String sql);

    public Object afterLoadData(ReportRequest rrequest,ReportBean rbean,Object typeObj,Object dataObj);

    public RowDataByInterceptor beforeDisplayReportDataPerRow(AbsReportType reportTypeObj,ReportRequest rrequest,int rowindex,int colspans,
            List lstColBeans);

    public ColDataByInterceptor beforeDisplayReportDataPerCol(AbsReportType reportTypeObj,ReportRequest rrequest,Object displayColBean,int rowindex,
            String value);

    public void doEnd(ReportRequest rrequest,ReportBean rbean);
}
